Skip to content

Add UNURAN sampling#71

Merged
wrdxwrdxwrdx merged 5 commits intomainfrom
distribution/sampling
Mar 17, 2026
Merged

Add UNURAN sampling#71
wrdxwrdxwrdx merged 5 commits intomainfrom
distribution/sampling

Conversation

@wrdxwrdxwrdx
Copy link
Collaborator

@wrdxwrdxwrdx wrdxwrdxwrdx commented Feb 21, 2026

UNU.RAN integration

Start with notebooks and scripts under examples/—they showcase end-to-end scenarios for the new sampling strategy.

Now you need to run this after git clone
git submodule update --init --remote --recursive

Now unuran submodule cloning from dev branch. Please review PR

WARNING

Added dpdf to registry. This is done due to the fact that many methods require it to work. In the future, it's worth implementing it more correctly in the registry.

Platforms

  • Supported: Linux, macOS and Windows🙏. Windows requires MVSC.

Added

  1. CFFI build + UNU.RAN bindings.
  2. DefaultSamplingStrategy and DefaultSampler that samples based on a distribution and method config.
  3. Tests covering CFFI build, callbacks, initialization, and orchestration.

Characteristics & methods

  • Continuous (PDF/CDF/PPF) -> methods AROU, TDR, HINV, PINV, NINV.
  • Discrete (PMF/CDF) -> DGT.

@wrdxwrdxwrdx wrdxwrdxwrdx force-pushed the distribution/sampling branch 2 times, most recently from a1de7e9 to d8ff3f0 Compare February 22, 2026 23:15
@wrdxwrdxwrdx wrdxwrdxwrdx marked this pull request as ready for review February 22, 2026 23:57
Copy link
Collaborator

@LeonidElkin LeonidElkin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed only core/* except for _unuran_sampler

@LeonidElkin LeonidElkin added API: Design ALG: Sampling New algorithms for sampling or improvements of existing ones CI: tooling CI: tests labels Feb 23, 2026
Copy link
Collaborator

@LeonidElkin LeonidElkin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Implement tests as packages with __init__.py

@LeonidElkin
Copy link
Collaborator

Rename vendor to subprojects

@wrdxwrdxwrdx wrdxwrdxwrdx force-pushed the distribution/sampling branch 2 times, most recently from 1478930 to cd12314 Compare March 2, 2026 18:05
@wrdxwrdxwrdx wrdxwrdxwrdx requested a review from LeonidElkin March 2, 2026 18:39
@wrdxwrdxwrdx wrdxwrdxwrdx force-pushed the distribution/sampling branch from cd12314 to 5c22a36 Compare March 2, 2026 18:48
@wrdxwrdxwrdx wrdxwrdxwrdx force-pushed the distribution/sampling branch 5 times, most recently from 9d8e821 to fa8b337 Compare March 6, 2026 18:47
@wrdxwrdxwrdx wrdxwrdxwrdx requested a review from LeonidElkin March 6, 2026 18:54
@wrdxwrdxwrdx wrdxwrdxwrdx force-pushed the distribution/sampling branch 3 times, most recently from a75d898 to 568f0f6 Compare March 11, 2026 14:18
@Desiment Desiment self-requested a review March 15, 2026 21:37
Desiment
Desiment previously approved these changes Mar 15, 2026
@wrdxwrdxwrdx wrdxwrdxwrdx force-pushed the distribution/sampling branch from 5beffc9 to 38e83a4 Compare March 16, 2026 17:58
Copy link
Collaborator

@LeonidElkin LeonidElkin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Very good job! Well done

@wrdxwrdxwrdx wrdxwrdxwrdx merged commit 6b77611 into main Mar 17, 2026
14 checks passed
@wrdxwrdxwrdx wrdxwrdxwrdx deleted the distribution/sampling branch March 17, 2026 15:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ALG: Sampling New algorithms for sampling or improvements of existing ones API: Design CI: tests CI: tooling

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants